from typing import Union

from fastapi import FastAPI
import uuid

app = FastAPI()

@app.get("/")
def read_root():
    return {"Hello": "World"}


@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
    return {"item_id": item_id, "q": q}

@app.post("/token")
def read_item():
    return {"access_token": uuid.uuid4()}

@app.get("/api/meeting-schedule/processing/device/{device_id}")
def read_item(device_id: str):
    return {"meeting_title": "测试会议1", "meeting_id": 1,
            "meeting_room_id":1, "meeting_room_name":"测试会议室1",
            "user_id":1, "moderator_name":"张三",
            "secretary_name":"李四","attendant_name":"五王",
            "device_name":"设备1","password":"123456"}

@app.get("/api/meeting-room/{meeting_room_id}")
def read_item(meeting_room_id: int):
    return {"id":1, "name": "测试会议室1", "projectors":[{"id":1,"name":"张三"}]}

@app.get("/api/index-design")
def read_item():
    return {"id":1}

@app.get("/api/meeting-file")
def read_item():
    return {"data":[]}

@app.get("/api/index/modules")
def read_item():
    return {"data":[]}

@app.post("/api/meeting-attendee/sign-in")
def read_item():
    return {"result": True}